<?php
/**
 * Extend Zend_Application_Resource_Translate
 * Auto select translate file by locale
 * 
 * @copyright  Copyright (c) 2011 Ricky Feng (http://code.google.com/p/rphp4zf)
 * @license    New BSD License
 */

class Mediad2_Application_Resource_View extends Zend_Application_Resource_ResourceAbstract
{
    public function init()
    {
    	$config = $this->getBootstrap()->getApplication()->getOptions();
    	$smartyconfig = $config["smarty"];
    	    	    	
    	$view = new Mediad2_View_Smarty(null,$smartyconfig);
    	//保存进注册表
    	Zend_Registry::set('view', $view);
    	
    	return $view;
    	
    }
}

